﻿using System;
using System.Linq.Expressions;
using MoroMoro.Samples.ToDoList.Base.Domain.Viewpoints;

namespace MoroMoro.Samples.ToDoList.Domain.ToDos
{
    /// <summary>
    /// <see cref="ToDo"/> の<see cref="ToDo.RegisteredDateTime">登録日時</see>を分析します。
    /// </summary>
    [Serializable]
    public sealed class ToDoRegisteredDateTimeViewpoint : Viewpoint<ToDo, DateTime>
    {
        /// <inheritdoc/>
        protected override Expression<Func<ToDo, DateTime>> CreateExpression()
        {
            return entity => entity.RegisteredDateTime;
        }
    }
}
